<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:import url="/jsp/pager/pagerForm.jsp"></c:import>

<form method="post" rel="pagerForm" action="<c:url value='/customerCall/showList'/>" onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><label>关键词：</label> <input type="text" name="keywords" value="${param.keywords}" /></td>
				</tr>
				<tr>
					<td><label>起始日期：</label> <input name="startContactDate" class="date" type="text" value="${param.startContactDate}"
						readonly=" true" dateFmt="yyyy-M-d" /></td>
					<td><label>结束日期：</label> <input name="stopContactDate" class="date" type="text" value="${param.stopContactDate}"
						readonly=" true" dateFmt="yyyy-M-d" /></td>
					<td><label>客户：</label> <input name="customer" type="text" value="${param.customer}" /></td>
					<td><label>业务员：</label> <input name="salesman" type="text" value="${param.salesman}" suggestFields="salesman"
						suggestUrl="<c:url value='/showSalesmanSuggest' />" lookupGroup="" /></td>
				</tr>
				<tr>
					<td><label>结果：</label> <select name="contactResult" class="combox">
							<option value="">请选择</option>
							<c:forEach var="item" items="${resultList}">
								<option value="${item.contactResult}" ${item.contactResult eq param.contactResult ? 'selected="selected"' : ''}>${item.contactResult}</option>
							</c:forEach>
					</select></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">搜索</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</form>

<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<c:if test="${sessionInfo.role == '管理员' || sessionInfo.role == '财务' || sessionInfo.role == '业务员'}">
				<li><a class="add" target="dialog" width="530" height="600" rel="customerCallAdd" mask="true"
					href="<c:url value='/customerCall/showAdd'/>" title="添加"><span>添加</span></a></li>
			</c:if>
			<c:if test="${sessionInfo.role == '管理员' || sessionInfo.role == '财务' || sessionInfo.role == '业务员'}" >
				<li><a class="edit" target="dialog" width="530" height="600" rel="customerCallEdit" mask="true"
					href="<c:url value='/customerCall/showEdit/{slt_objId}'/>" title="编辑"><span>编辑</span></a></li>
			</c:if>
			<c:if test="${sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
				<li><a class="delete" target="ajaxTodo" href="<c:url value='/customerCall/delete/{slt_objId}'/>" title="你确定要删除吗?"><span>删除</span></a></li>
			</c:if>
			<li class="line">line</li>
			<li><a class="icon" href="javascript:$.printBox('customerCall_list_print')"><span>打印</span></a></li>
		</ul>
	</div>

	<div id="customerCall_list_print">
		<table class="list" width="1500" asc="asc" desc="desc" layoutH="166">
			<thead>
				<tr>
					<th width="5%">合计</th>
					<th width="95%" colspan="15">合计：${total.count}</th>
				</tr>
				<tr>
					<th width="5%">序号</th>
					<th width="5%" orderField="contactDate" class="${pageHelper.orderField eq 'contactDate' ? param.orderDirection : ''}">日期</th>
					<th width="15%" orderField="customer" class="${pageHelper.orderField eq 'customer' ? param.orderDirection : ''}">客户名称</th>
					<th width="5%" orderField="customerType" class="${pageHelper.orderField eq 'customerType' ? param.orderDirection : ''}">客户类型</th>
					<th width="10%" orderField="address" class="${pageHelper.orderField eq 'address' ? param.orderDirection : ''}">地址</th>
					<th width="5%" orderField="contacts" class="${pageHelper.orderField eq 'contacts' ? param.orderDirection : ''}">联系人</th>
					<th width="5%" orderField="department" class="${pageHelper.orderField eq 'department' ? param.orderDirection : ''}">部门</th>
					<th width="5%" orderField="job" class="${pageHelper.orderField eq 'job' ? param.orderDirection : ''}">职务</th>
					<th width="5%" orderField="telephone" class="${pageHelper.orderField eq 'telephone' ? param.orderDirection : ''}">座机</th>
					<th width="5%" orderField="phone" class="${pageHelper.orderField eq 'phone' ? param.orderDirection : ''}">手机</th>
					<th width="5%" orderField="fax" class="${pageHelper.orderField eq 'fax' ? param.orderDirection : ''}">传真</th>
					<th width="10%" orderField="otherContact" class="${pageHelper.orderField eq 'otherContact' ? param.orderDirection : ''}">其他联系方式</th>
					<th width="5%" orderField="requirment" class="${pageHelper.orderField eq 'requirment' ? param.orderDirection : ''}">需求</th>
					<th width="5%" orderField="remarks" class="${pageHelper.orderField eq 'remarks' ? param.orderDirection : ''}">备注</th>
					<th width="5%" orderField="result" class="${pageHelper.orderField eq 'result' ? param.orderDirection : ''}">结果</th>
					<th width="5%" orderField="salesman" class="${pageHelper.orderField eq 'salesman' ? param.orderDirection : ''}">业务员</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="item" items="${customerCallList}" varStatus="s">
					<tr target="slt_objId" rel="${item.id }">
						<td>${s.index + 1}</td>
						<td>${item.contactDate}</td>
						<td>${item.customer}</td>
						<td>${item.customerType}</td>
						<td>${item.address}</td>
						<td>${item.contacts}</td>
						<td>${item.department}</td>
						<td>${item.job}</td>
						<td>${item.telephone}</td>
						<td>${item.phone}</td>
						<td>${item.fax}</td>
						<td>${item.otherContact}</td>
						<td>${item.requirment}</td>
						<td>${item.remarks}</td>
						<td>${item.result}</td>
						<td>${item.salesman}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>

	<c:import url="/jsp/pager/panelBar.jsp"></c:import>

</div>
